package com.seezoon.infrastructure.configuration.context;

import java.util.Locale;

/**
 * 用户语言
 */
public class LocaleContextHolder {

    private static final ThreadLocal<Locale> localeHolder = new ThreadLocal<>();

    public static void set(Locale locale) {
        localeHolder.set(locale);
    }

    public static Locale get() {
        return localeHolder.get();
    }

    public static void clear() {
        localeHolder.remove();
    }
}